// 交易相关操作
import request,{Method} from '@/plugins/api.js'



// 用户增加收货地址
export function createTrade (params) {
    return request({
      url: '/product/trude/createTrade',
      method: Method.POST,
      data: params
    });
}

// 获取支付相关交易参数
export function tradeDetail (params) {
    return request({
      url: '/order/trade/tradeDetail',
      method: Method.POST,
      data: params
    });
}

// 处理支付请求 生成二维码
export function handlePay (params) {
    return request({
      url: '/order/paymentlog/handlePay',
      method: Method.POST,
      data: params
    });
}

// 前端定时器5秒一次轮训该接口 查询当前交易的状态
export function payCallBack (params) {
    return request({
      url: '/order/paymentlog/payCallBack',
      method: Method.POST,
      data: params
    });
}
